Skip to content

JACK: Fail AudioIODevice::open() if the client can't be activated - #1702

Open
emezeske wants to merge 1 commit into
juce-framework:masterfrom
emezeske:pr/jack-activate-failure
Open

JACK: Fail AudioIODevice::open() if the client can't be activated#1702
emezeske wants to merge 1 commit into
juce-framework:masterfrom
emezeske:pr/jack-activate-failure

Conversation

@emezeske

@emezeske emezeske commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

An application can end up completely silent, with a device that reports itself open and running but never invokes its audio callback, and no error surfaced anywhere. With pipewire-jack this happens in practice by changing the enabled channels in AudioDeviceSelectorComponent, whose rapid deactivate/activate cycle pipewire-jack can refuse.

The cause is that JackAudioIODevice::open() calls jack_activate() and ignores its return value, so a failed activation still reports success and marks the device open.

With this change open() fails with an error when jack_activate() returns nonzero, so AudioDeviceManager tears the device down and reports the error instead of silently keeping a dead device.

@emezeske
emezeske marked this pull request as ready for review August 10, 2026 20:09
@juce-push-bot

Copy link
Copy Markdown
Collaborator

This pull request has been mentioned on The JUCE Forum. There might be relevant details there:

https://forum.juce.com/t/pr-jack-fail-audioiodevice-open-if-the-client-cant-be-activated/69279/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants